<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>瑜伽会馆个人页面</title>
    <style>
        body {
            font-family: 'Helvetica Neue', Arial, sans-serif;
            background: #f6f6f6;
            margin: 0;
            padding: 0;
        }
        .container {
            max-width: 400px;
            margin: 40px auto;
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            padding: 24px;
        }
        .avatar {
            display: block;
            margin: 0 auto 16px;
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: #e0e0e0;
            object-fit: cover;
        }
        h2 {
            text-align: center;
            margin-bottom: 24px;
            color: #333;
        }
        .form-group {
            margin-bottom: 18px;
        }
        label {
            display: block;
            margin-bottom: 6px;
            color: #666;
        }
        input[type="text"], input[type="password"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 16px;
            box-sizing: border-box;
        }
        button {
            width: 100%;
            padding: 12px;
            background: #6bc1b6;
            color: #fff;
            border: none;
            border-radius: 6px;
            font-size: 16px;
            cursor: pointer;
            margin-top: 8px;
        }
        .profile {
            text-align: center;
        }
        .logout-btn {
            background: #f44336;
            margin-top: 16px;
        }
    </style>
</head>
<body>
    <div class="container" id="login-container">
        <h2>登录瑜伽会馆</h2>
        <div class="form-group">
            <label for="username">用户名</label>
            <input type="text" id="username" placeholder="请输入用户名">
        </div>
        <div class="form-group">
            <label for="password">密码</label>
            <input type="password" id="password" placeholder="请输入密码">
        </div>
        <button onclick="login()">登录</button>
    </div>

    <div class="container" id="profile-container" style="display:none;">
        <img src="https://img.icons8.com/ios-filled/100/6bc1b6/user-male-circle.png" class="avatar" id="avatar">
        <div class="profile">
            <h2 id="profile-name"></h2>
            <p id="profile-level">会员等级：普通会员</p>
            <p id="profile-date">注册时间：2023-01-01</p>
            <div style="margin:24px 0 16px 0;">
                <button style="background:#6bc1b6;margin-bottom:8px;" onclick="editProfile()">编辑个人资料</button>
            </div>
            <div class="section">
                <h3 style="text-align:left;color:#6bc1b6;">我的课程</h3>
                <ul id="my-courses" style="padding-left:18px;text-align:left;color:#444;">
                    <li>瑜伽基础班</li>
                    <li>高级理疗瑜伽</li>
                </ul>
            </div>
            <div class="section">
                <h3 style="text-align:left;color:#6bc1b6;">我的预约</h3>
                <ul id="my-bookings" style="padding-left:18px;text-align:left;color:#444;">
                    <li>9月10日 19:00 - 瑜伽基础班</li>
                    <li>9月15日 18:00 - 高级理疗瑜伽</li>
                </ul>
            </div>
            <div class="section">
                <h3 style="text-align:left;color:#6bc1b6;">我的收藏</h3>
                <ul id="my-favorites" style="padding-left:18px;text-align:left;color:#444;">
                    <li>冥想放松课程</li>
                </ul>
            </div>
            <div class="section">
                <h3 style="text-align:left;color:#6bc1b6;">最近活动</h3>
                <ul id="recent-activity" style="padding-left:18px;text-align:left;color:#444;">
                    <li>8月30日 完成“高级理疗瑜伽”课程</li>
                    <li>8月28日 预约“瑜伽基础班”</li>
                </ul>
            </div>
            <button class="logout-btn" onclick="logout()">退出登录</button>
        </div>
    </div>
    <div class="container" id="footer-nav" style="max-width:400px;margin:24px auto 0 auto;padding:12px 0 0 0;text-align:center;background:none;box-shadow:none;">
    <a href="home.html" style="margin:0 12px;color:#6bc1b6;text-decoration:none;font-size:18px;">首页</a>
    <a href="index.html" style="margin:0 12px;color:#6bc1b6;text-decoration:none;font-size:18px;">课程</a>
    <a href="message.html" style="margin:0 12px;color:#6bc1b6;text-decoration:none;font-size:18px;">消息</a>
    <a href="my.html" style="margin:0 12px;color:#6bc1b6;text-decoration:none;font-size:18px;font-weight:bold;">个人中心</a>
    </div>
        </div>
    </div>

    <script>
        // 固定账号密码模拟登录
        const FIXED_USER = {
            username: 'testuser',
            password: '123456',
            level: '普通会员',
            regDate: '2023-01-01'
        };
        function login() {
            const username = document.getElementById('username').value.trim();
            const password = document.getElementById('password').value;
            if (username === FIXED_USER.username && password === FIXED_USER.password) {
                document.getElementById('login-container').style.display = 'none';
                document.getElementById('profile-container').style.display = 'block';
                document.getElementById('profile-name').textContent = username;
                document.getElementById('profile-level').textContent = '会员等级：' + FIXED_USER.level;
                document.getElementById('profile-date').textContent = '注册时间：' + FIXED_USER.regDate;
            } else {
                alert('账号或密码错误！\n账号:testuser\n密码:123456');
            }
        }
        function logout() {
            document.getElementById('profile-container').style.display = 'none';
            document.getElementById('login-container').style.display = 'block';
            document.getElementById('username').value = '';
            document.getElementById('password').value = '';
        }
        function editProfile() {
            alert('编辑个人资料功能暂未开放');
        }
    </script>
</body>
</html>